package com.alog.common.code;

public class ThreadTest {
    public static void main(String[] args) {
        Object lock = new Object();
        Integer count = 0;
//        SyncConsumer consumer = new SyncConsumer(lock,"consumer1");
//        consumer.start();
//        SyncProductor productor = new SyncProductor(lock, count, "productor1");
//        productor.start();
        for(int i = 1; i <= 10; i++){
            SyncConsumer consumer = new SyncConsumer(lock,"consumer" + i);
            consumer.start();
            SyncProductor productor = new SyncProductor(lock, "productor" + i);
            productor.start();
        }
    }
}
